package ltd.tiantian.mall.dao;

import ltd.tiantian.mall.entity.TianTianMallUserCouponRecord;
import ltd.tiantian.mall.util.PageQueryUtil;

import java.util.List;

public interface TianTianMallUserCouponRecordMapper {
    int deleteByPrimaryKey(Long couponUserId);

    int insert(TianTianMallUserCouponRecord record);

    int insertSelective(TianTianMallUserCouponRecord record);

    TianTianMallUserCouponRecord selectByPrimaryKey(Long couponUserId);

    int updateByPrimaryKeySelective(TianTianMallUserCouponRecord record);

    int updateByPrimaryKey(TianTianMallUserCouponRecord record);

    int getUserCouponCount(Long userId, Long couponId);

    int getCouponCount(Long couponId);

    List<TianTianMallUserCouponRecord> selectMyCoupons(PageQueryUtil pageQueryUtil);

    Integer countMyCoupons(PageQueryUtil pageQueryUtil);

    List<TianTianMallUserCouponRecord> selectMyAvailableCoupons(Long userId);

    TianTianMallUserCouponRecord getUserCouponByOrderId(Long orderId);
}
